<template>
    <div id="gzcargo">
      <Focus :focus="focus" :foucsUrl="foucsUrl"></Focus>
      <Listcontent :listcontent="listcontent" :listdataUrl="listdataUrl" :times="times"></Listcontent>
    </div>
</template>
<script>
import Listcontent from "../publicModule/listcontent";
import Focus from "../publicModule/focus";
export default {
  data() {
    return {
      listcontent: [],
      focus: [],
      foucsUrl: "/api/v3/ads/GetBannersFormTypeV2?AreaTypeID=1&valueID=1",
      listdataUrl: "/api/v3/pinhuoitem/GetHomeActivityList2?cid=1",
      times: ""
    };
  },
  components: {
    Listcontent,
    Focus
  },
  created() {
    const _this = this;
    this.$http
      .get(this.foucsUrl)
      .then(result => {
        _this.focus = result.data.Data.ADList;
      })
      .catch(err => {
        console.log("轮播" + err);
      });

    //list
    this.$http
      .get(this.listdataUrl + "&debug=1&pageIndex=1&pageSize=100")
      .then(result => {
        var rs = result.data.Data.ActivityList;
        _this.listcontent = rs;
        _this.times = rs[0].ToTime;
      })
      .catch(err => {
        console.log("首页" + err);
      });
  }
};
</script>
<style lang="scss" scoped>
</style>
